<template>
  <div>
    <div class="update-list-box" v-for="(item,index) in data" :key="index" v-show="index == update">
      <div class="update-list-item" v-for="(item2,index2) in item" :key="index2">
        <img :src="item2.img" alt="">
        <div class="text">
          <p class="name" :title="item2.name">{{item2.name}}</p>
          <p class="num">
            第{{item2.parts}}话
          </p>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
  export default{
    name:'UpdateList',
    props:{
      update:{
        type:Number,
        required:false,
        default:0
      },
      data:{
        type:Array
      }
    },
    data(){
      return{

      }
    },
  }
</script>

<style scoped>
  .update-list-box{
    display: flex;
    height: 376px;
    flex-wrap: wrap;
    align-content: flex-start;
    justify-content: flex-start;
    overflow: auto;
    width: 854px;
  }
  .update-list-item{
    height: 70px;
    width:227px;
    display: flex;
    justify-content: space-between;
    margin: 0 30px 24px 0;
  }
  .update-list-item>img{
    height:70px;
    width:70px;
    border-radius: 2px;
    margin-right: 12px;
    cursor: pointer;
  }
  .text{
    width:152px;
    font-weight: 500;
  }
  .name{
    font-size: 14px;
    height: 37px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    margin: 2px 0 12px;
    cursor: pointer;
    transition: color .3s;
  }
  .name:hover{
    color:#00A1D6;
  }
  .num{
    width: 100%;
    color:#00A1D6;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 500;
  }
</style>
